#include "proclib.h"

static char *pathname = "/root/ctest/proc/pr_env";

static char *argv0[] = {
    "exec",
    "hello",
    "world",
    NULL
};

static char *envv[] = {
    "env1=shanghai",
    "env2=fujian"
};

int main(int argc, char *argv[]) {
    if (execve(pathname, argv0, envv) < 0) {
        printf("error when execve\n");
        exit(EXIT_FAILURE);
    }

    return EXIT_SUCCESS;
}
